<div class="row text-center">
  <div class="col-md-4">
    <div class="btn-group">
      <button
        class="btn btn-primary"
        (click)="decrement()"
        [disabled]="prevBtnDisabled"
      >
        Previous
      </button>
      <button class="btn btn-outline-secondary" (click)="today()">Today</button>
      <button
        class="btn btn-primary"
        (click)="increment()"
        [disabled]="nextBtnDisabled"
      >
        Next
      </button>
    </div>
  </div>
  <div class="col-md-4">
    <h3>{{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }}</h3>
  </div>
  <div class="col-md-4">
    <div class="btn-group">
      <div
        class="btn btn-primary"
        (click)="changeView('month')"
        [class.active]="view === 'month'"
      >
        Month
      </div>
      <div
        class="btn btn-primary"
        (click)="changeView('week')"
        [class.active]="view === 'week'"
      >
        Week
      </div>
      <div
        class="btn btn-primary"
        (click)="changeView('day')"
        [class.active]="view === 'day'"
      >
        Day
      </div>
    </div>
  </div>
</div>
<br />

<div>
  @switch (view) { @case ('month') {
  <mwl-calendar-month-view
    [viewDate]="viewDate"
    [events]="events"
    (beforeViewRender)="beforeMonthViewRender($event)"
  />
  } @case ('week') {
  <mwl-calendar-week-view [viewDate]="viewDate" [events]="events" />
  } @case ('day') {
  <mwl-calendar-day-view [viewDate]="viewDate" [events]="events" />
  } }
</div>
